﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace BTv2.Model
{
    public abstract class Action : INotifyPropertyChanged
    {


        public event PropertyChangedEventHandler PropertyChanged;

        // This method is called by the Set accessor of each property. 
        // The CallerMemberName attribute that is applied to the optional propertyName 
        // parameter causes the property name of the caller to be substituted as an argument. 
        protected void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
       public int ID { get; set; }
       private string _name;
       public string Name {
           get
           {
               return _name;
           }
           set
           {
               if (value != _name)
               {
                   _name = value;
                   NotifyPropertyChanged();
               }
           }

       
       }
       public string Description { get; set; }
       public abstract bool Execute();

    }
}
